/*******************************************************************************
 * Copyright (c) 2009 Kevin Bierhoff and others.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the Eclipse Public License v1.0
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/epl-v10.html
 *
 * Contributors:
 *     Kevin Bierhoff - initial API and implementation
 *******************************************************************************/
package com.googlecode.twelfdevtools.twelfast;

import com.googlecode.twelfdevtools.model.ITwelfConstant;

public class ConstantBinding implements ITwelfBinding {
	
	private ITwelfConstant model;
	
	public ConstantBinding(ITwelfConstant model) {
		assert model != null;
		this.model = model;
	}
	
	public ITwelfConstant getModelElement() {
		return model;
	}

	public String getDefinition() {
		return model.getDeclaration();
	}
	
	@Override
	public String toString() {
		return model == null ? "null" : model.getDeclaration();
	}

}
